package com.esionwong.basic.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.esionwong.basic.entity.SysDepartment;
import com.esionwong.basic.param.SysDepartmentPageParam;
import com.esionwong.basic.vo.SysDepartmentQueryVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

/**
 * 部门 Mapper 接口
 *
 * @author esionwong
 */
@Repository
public interface SysDepartmentMapper extends BaseMapper<SysDepartment> {
    /**
     * 根据ID获取查询对象
     *
     * @param id 部门ID
     * @return 部门信息
     */
    SysDepartmentQueryVo getSysDepartmentById(Serializable id);

    /**
     * 获取分页对象
     *
     * @param page 分页
     * @param sysDepartmentPageParam 查询信息
     * @return 部门信息列表
     */
    IPage<SysDepartmentQueryVo> getSysDepartmentPageList(@Param("page") Page page, @Param("param") SysDepartmentPageParam sysDepartmentPageParam);
}
